package com.ruoyi.squadweb.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.squadweb.domain.FactionRanking;
import com.ruoyi.squadweb.mapper.FactionRankingMapper;
import com.ruoyi.squadweb.service.IFactionRankingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 战队排名Service业务层处理
 *
 * @author ruoyi
 * @date 2024-07-19
 */
@Service
@DataSource(value = DataSourceType.SLAVE2)
public class FactionRankingServiceImpl implements IFactionRankingService
{
    @Autowired
    private FactionRankingMapper factionRankingMapper;

    /**
     * 查询战队排名
     *
     * @param teamId 战队排名主键
     * @return 战队排名
     */
    @Override
    public FactionRanking selectFactionRankingByTeamId(String teamId)
    {
        return factionRankingMapper.selectFactionRankingByTeamId(teamId);
    }

    /**
     * 查询战队排名列表
     *
     * @param factionRanking 战队排名
     * @return 战队排名
     */
    @Override
    public List<FactionRanking> selectFactionRankingList(FactionRanking factionRanking)
    {
        return factionRankingMapper.selectFactionRankingList(factionRanking);
    }

    /**
     * 新增战队排名
     *
     * @param factionRanking 战队排名
     * @return 结果
     */
    @Override
    public int insertFactionRanking(FactionRanking factionRanking)
    {
        return factionRankingMapper.insertFactionRanking(factionRanking);
    }

    /**
     * 修改战队排名
     *
     * @param factionRanking 战队排名
     * @return 结果
     */
    @Override
    public int updateFactionRanking(FactionRanking factionRanking)
    {
        return factionRankingMapper.updateFactionRanking(factionRanking);
    }

    /**
     * 批量删除战队排名
     *
     * @param teamIds 需要删除的战队排名主键
     * @return 结果
     */
    @Override
    public int deleteFactionRankingByTeamIds(Long[] teamIds)
    {
        return factionRankingMapper.deleteFactionRankingByTeamIds(teamIds);
    }

    /**
     * 删除战队排名信息
     *
     * @param teamId 战队排名主键
     * @return 结果
     */
    @Override
    public int deleteFactionRankingByTeamId(Long teamId)
    {
        return factionRankingMapper.deleteFactionRankingByTeamId(teamId);
    }

    @Override
    public List<Map<String, String>> getTeamMemberInfo(String teamId) {
        return factionRankingMapper.getTeamMemberInfo(teamId);
    }
}
